package com.xiangban.xiangbanmall.fegin;


import com.xiangban.xiangbanmall.fegin.fallback.UserServiceFallback;
import com.xiangban.xiangbanmall.model.TUser;
import com.xiangban.xiangbanmall.model.res.ApiResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.List;

@Component
@FeignClient(value = "${system.personnel}",fallbackFactory = UserServiceFallback.class)
public interface UserServiceFeign {
    @RequestMapping("/user/getUserInfo")
    @ApiOperation("获取用户信息")
    ApiResult<Object> getUserInfo(@RequestParam String token);

    @RequestMapping("/user/updateUserInfo")
    @ApiOperation("修改用户信息")
    ApiResult<Object> updateUserInfo(HashMap<String,Object> map);

    @RequestMapping("/user/getUserList")
    @ApiOperation("获取所有用户信息列表(跑批)")
    ApiResult<List<TUser>> getUserList();



}
